import request from '@/utils/request'

// 查询申请单列表
export function listApproval(query) {
  return request({
    url: '/manage/approval/list',
    method: 'get',
    params: query
  })
}

// 查询申请单详细
export function getApproval(id) {
  return request({
    url: '/manage/approval/' + id,
    method: 'get'
  })
}

// 新增申请单
export function addApproval(data) {
  return request({
    url: '/manage/approval',
    method: 'post',
    data: data
  })
}

// 修改申请单
export function updateApproval(data) {
  return request({
    url: '/manage/approval',
    method: 'put',
    data: data
  })
}

// 删除申请单
export function delApproval(id) {
  return request({
    url: '/manage/approval/' + id,
    method: 'delete'
  })
}
